#ifndef __LINKEDLIST_H__
#define __LINKEDLIST_H__

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <sys/types.h>
#ifndef __COMPLEX_H__
#define __COMPLEX_H__
#include <complex.h>
#endif

/* --------------------------- Public Typedefs --------------------------- */

typedef struct list 
{ 
   void *data; 
   struct list *next; 
}List; 

typedef List *ListPtr;

/* --------------------------- Public Mappings --------------------------- */

#define p_linkedListInit                     i_linkedListInit
#define p_linkedListInsert                   i_linkedListInsert
#define p_linkedListRemoveFirst              i_linkedListRemoveFirst
#define p_linkedListEmpty                    i_linkedListEmpty
#define p_linkedListDoesExistInList          i_linkedListDoesExistInList
#define p_linkedListGetDataFromPosition      i_linkedListGetDataFromPosition

/* --------------------------- Inlined Methods --------------------------- */


/* --------------------------- Public Methods --------------------------- */

void i_linkedListInit(void);
void i_linkedListInsert(ListPtr * pList, void * data, int dataSize);
unsigned int i_linkedListRemoveFirst(ListPtr * pList, void (*releaseFromMemoryCallBack)(void * data));
unsigned int i_linkedListEmpty(List **pList);
int i_linkedListDoesExistInList(ListPtr * pList, void * compData, unsigned int (*compDataStructCallBack)(void * dataStruc, void * compData));
void * i_linkedListGetDataFromPosition(ListPtr * pList, unsigned int position);


#endif
